<html>
<head>
	<meta name="viewport" content="initial-scale=1.0, user-scalable=no"/> 
	<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
	<title>GMap TRACING!</title>
    <?php require_once("../config.php"); 
		  require_once('../MAPS/google/header.php');
	?>
    
	<link href="css/GMapTracing.css" rel="stylesheet" type="text/css" />
    <!-- include clases MY -->
    <script src="../js/myClass/MyClass.js" type="text/javascript"></script> 
    <script src="../js/myClass/MyAjax.js" type="text/javascript"></script>
    <script src="../js/myClass/MyUtils.js" type="text/javascript"></script>  
    <script src="../js/myClass/MyDate.js" type="text/javascript"></script>     
    <script src="../js/myClass/MyBoundingHandler.js" type="text/javascript"></script>
    <!-- include MiniMenu -->
    <link href="js/miniMenu/miniMenu.css" rel="stylesheet" type="text/css" />
    <script src="js/miniMenu/MiniMenu.js" type="text/javascript"></script>    
    <!-- include GMapFoundDir.js -->
    <script src="js/GMapTracing.js" type="text/javascript"></script>
    <!-- include Menu/Sections -->    
    <script src="js/MenuSection.js" type="text/javascript"></script>
    <script src="js/MenuMessage.js" type="text/javascript"></script>
    <script src="js/MenuInfoGral.js" type="text/javascript"></script> 
    <script src="js/MenuGetRoad.js" type="text/javascript"></script>    
    <!-- include json.js -->
    <script src="../js/json.js" type="text/javascript"></script>
</head>

<body onLoad="onLoadPage();" onResize="onResizePage();">
<table id="tablaMaqueta" align="center" border="1" bordercolor="#CCCCCC" width="100%">
	<tr onMouseOver="">
    	<td><div id="Mapa"></div></td>
        <td id='tdMenu' width='300px'><div id="Menu"></div></td>
    </tr>
</table>
</body>
<script type="text/javascript">
	var tablaMaqueta = document.getElementById('tablaMaqueta');
	var mapDIV = document.getElementById('Mapa');
	var menuDIV = document.getElementById('Menu');
	var defaultLat = <?= DEFAULT_LATITUD ?>;
	var defaultLng = <?= DEFAULT_LONGITUD ?>;
	var wintitle = '<?= WINTITLE_TRACING ?>';
	var refreshTime = <?= REFRESH_TRACING ?>;
	var tableEvento = '<?= TABLE_EVENTOS_TRACING ?>';
	var eventoID = null;
	var cuentaID = null;
	var movilID = null;
	var gmapTracing = null;
	
	
	//TEMPORAL VALUES
	/*eventoID = 199875;
	cuentaID = 100000528;
	movilID = 100002052;*/
	
	<? if (isset($_REQUEST['EVENTOID'])) {?>
		eventoID = '<?= $_REQUEST['EVENTOID']; ?>';
	<? } ?>
	<? if (isset($_REQUEST['CUENTAID'])) {?>
		cuentaID = '<?= $_REQUEST['CUENTAID']; ?>';
	<? } ?>
	<? if (isset($_REQUEST['MOVILID'])) {?>
		movilID = '<?= $_REQUEST['MOVILID']; ?>';
	<? } ?>
	
	function onResizePage(){
		var docDim = myBoundingHandler.getDocumentDim();
		tablaMaqueta.style.height = docDim.h + 'px';
		mapDIV.style.height = docDim.h - 10 + 'px';
		menuDIV.style.height = docDim.h - 10 + 'px';
		if (gmapTracing!=null)
			gmapTracing.renderize();
	}
	
	function onLoadPage(){
		 onResizePage();
		 gmapTracing = new GMapTracing({
										 mapContainer: mapDIV,
	 									 menuContainer: menuDIV,
										 initialZoom: 5, 
	 									 initialLat: defaultLat, 
										 initialLng: defaultLng,
										 wintitle: wintitle,
										 refreshTime: refreshTime,
										 eventoId: eventoID,
										 cuentaId: cuentaID,
										 movilId: movilID,
										 tableEvento :tableEvento
									   });
	}
</script>
</html>
